VERSION 4.00 Begin VB.Form frmString BorderStyle = 4 'Fixed ToolWindow Caption = "String" ClientHeight = 5235 ClientLeft = 330 ClientTop = 2385 ClientWidth = 7785 Height = 5640 Left = 270 MaxButton = 0 'False MDIChild = -1 'True ScaleHeight = 5235 ScaleWidth = 7785 ShowInTaskbar = 0 'False Top = 2040 Width = 7905 Begin VB.TextBox txt_Result BackColor = &H00C0C0C0& BorderStyle = 0 'None Height = 4005 Left = 105 Locked = -1 'True MultiLine = -1 'True ScrollBars = 2 'Vertical TabIndex = 8 Top = 630 Width = 7575 End Begin Threed.SSPanel SSPanel1 Align = 1 'Align Top Height = 480 Left = 0 TabIndex = 0 Top = 0 Width = 7785 _Version = 65536 _ExtentX = 13732 _ExtentY = 847 _StockProps = 15 ForeColor = -2147483640 BackColor = 12632256 Begin VB.ComboBox cmb_Function Height = 315 Left = 1365 TabIndex = 1 Top = 90 Width = 5100 End Begin Threed.SSCommand cmdNP Height = 300 Index = 1 Left = 7455 TabIndex = 10 Top = 90 Width = 255 _Version = 65536 _ExtentX = 450 _ExtentY = 529 _StockProps = 78 Caption = ">" BevelWidth = 1 Font3D = 3 RoundedCorners = 0 'False Outline = 0 'False End Begin Threed.SSCommand cmdNP Height = 300 Index = 0 Left = 6615 TabIndex = 9 Top = 90 Width = 255 _Version = 65536 _ExtentX = 450 _ExtentY = 529 _StockProps = 78 Caption = "<" BevelWidth = 1 Font3D = 3 RoundedCorners = 0 'False Outline = 0 'False End Begin VB.Label Label2 Caption = "&Select a function" Height = 255 Left = 90 TabIndex = 3 Top = 120 Width = 1275 End Begin Threed.SSCommand SSCommand1 Default = -1 'True Height = 300 Left = 6930 TabIndex = 2 Top = 90 Width = 465 _Version = 65536 _ExtentX = 820 _ExtentY = 529 _StockProps = 78 Caption = "&Go" BevelWidth = 1 RoundedCorners = 0 'False Outline = 0 'False End End Begin Threed.SSPanel SSPanel2 Align = 2 'Align Bottom Height = 465 Left = 0 TabIndex = 4 Top = 4770 Width = 7785 _Version = 65536 _ExtentX = 13732 _ExtentY = 820 _StockProps = 15 BackColor = 12632256 Begin VB.TextBox Text1 Height = 285 Left = 1440 TabIndex = 6 Tag = "A/BC/DEF/GHIJ/KLMNOP/" Top = 90 Width = 5370 End Begin Threed.SSCommand SSCommand2 Height = 285 Left = 6885 TabIndex = 7 Top = 90 Width = 825 _Version = 65536 _ExtentX = 1455 _ExtentY = 503 _StockProps = 78 Caption = "&Reset" BevelWidth = 1 Outline = 0 'False End Begin VB.Label Label1 Caption = "&Enter a test string" Height = 255 Left = 90 TabIndex = 5 Top = 120 Width = 1275 End End Attribute VB_Name = "frmString" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Option Base 1 Private Const Iteration = 250 Dim IsLoaded As Integer Dim TimerStartOk As Single Private Sub cmdNP_Click(Index As Integer) Call sub_NextPrev(cmb_Function, Index) End Sub Private Sub cmb_Function_Click() If (IsLoaded = False) Then Exit Sub mdiMCSTR.Picture1.Visible = True mdiMCSTR.Enabled = False SSPanel2.Visible = True txt_Result = "" DoEvents Select Case cmb_Function.ListIndex Case 0 Call TestOneCharFromLeft Case 1 Call TestOneCharFromRight Case 2 Call TestBlockCharFromLeft Case 3 Call TestBlockCharFromRight Case 4 Call TestGetIn Case 5 Call TestGetInR Case 6 Call TestGetInPart Case 7 Call TestGetInPartR Case 8 Call TestGetBlock Case 9 Call TestInsertChars Case 10 Call TestInsertByMask Case 11 Call TestInsertBlocks Case 12 Call TestInsertBlocksBy Case 13 Call TestRemoveOneChar Case 14 Call TestRemoveBlockChar Case 15 Call TestTokenIn Case 16 SSPanel2.Visible = False Call TestOrTokenX Case 17 SSPanel2.Visible = False Call TestAndTokenX Case 18 Call TestReverse Case 19 Call TestMixChars Case 20 Call TestScrollX Case 21 Call TestChangeChars Case 22 Call TestChangeCharsUntil Case 23 Call TestCheckChars Case 24 Call TestFilterChars Case 25 Call TestFilterNotChars Case 26 Call TestFilterBlocks Case 27 Call TestResizeString Case 28 Call TestResizeStringAndFill Case 29 Call TestCreateAndFill Case 30 Call TestFill Case 31 Call TestLrc Case 32 Call TestCompress Case 33 SSPanel2.Visible = False Call TestCompressTab Case 34 Call TestCompact Case 35 Call TestAlign Case 36 Call TestProperName Case 37 Call TestProperName2 Case 38 Call TestStringSAR Case 39 Call TestToHexa Case 40 SSPanel2.Visible = False Call TestRomanArabic Case 41 Call TestAsciiEbcdic Case 42 SSPanel2.Visible = False Call TestPatternMatch Case 43 SSPanel2.Visible = False Call TestPatternExtMatch Case 44 Call TestCheckNumericity Case 45 Call TestAlphaDigit Case 46 SSPanel2.Visible = False Call TestH2X Case 47 Call TestMorse End Select DoEvents mdiMCSTR.Enabled = True mdiMCSTR.Picture1.Visible = False End Sub Private Sub Form_Activate() mdiMCSTR.Label2.Caption = cInsertBlocks(mdiMCSTR.Label2.Tag, "" & Iteration) End Sub Private Sub Form_Load() IsLoaded = False Show Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1) Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w") IsLoaded = True End Sub Private Sub SSCommand1_Click() Call cmb_Function_Click End Sub Private Sub TestOneCharFromLeft() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cOneCharFromLeft(Str1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub SSCommand2_Click() Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1) Call SSCommand1_Click End Sub Private Sub TestOneCharFromRight() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cOneCharFromRight(Str1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestBlockCharFromLeft() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cBlockCharFromLeft(Str1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestBlockCharFromRight() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cBlockCharFromRight(Str1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestGetIn() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cGetIn(Str1, Sep1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestGetInR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cGetInR(Str1, Sep1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestGetInPart() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cGetInPart(Str1, Sep1, True) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestGetInPartR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cGetInPartR(Str1, Sep1, True) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestGetBlock() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim BlockSize As Integer intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text BlockSize = 2 strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf BlockSize = 3 strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf BlockSize = 4 strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cGetBlock(Str1, BlockSize, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestInsertChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cInsertChars(Str1, 1, "a") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestInsertByMask() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Mask1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Nr ## Price $###.##" Str2 = "0705200" Mask1 = "#" strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = String(cCount(Str1, "/"), "*") Mask1 = "/" strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cInsertByMask(Str1, Mask1, Str2) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestInsertBlocks() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "A~BC~DEF~GHIJ~" Str2 = "a~bc~def~ghij" strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf Str1 = "A~BC~DEF~GHIJ~" Str2 = "" strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cInsertBlocks(Str1, Str2) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Public Sub TestInsertBlocksBy() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = "a/bc/def/ghij" Sep1 = "/" strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = "" strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cInsertBlocksBy(Str1, Str2, Sep1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestRemoveOneChar() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveOneChar(Str1, 1) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cRemoveOneChar(Str1, 7) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Public Sub TestRemoveBlockChar() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cRemoveBlockChar(Str1, 1, 1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestTokenIn() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Sep1 = "/HM" strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf Sep1 = "G" strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf Sep1 = "g" strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cTokenIn(Str1, Sep1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestOrTokenX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Sep1 = "\" Str1 = "FOX|OVER|THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick|jumps|the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX\OVER\THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\jumps\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX/OVER/THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\JUMPS\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = LCase$("quick\jumps\THE") Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG") strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cOrTokenIn(Str2, Str1, Sep1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestAndTokenX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Sep1 As String intResult = 0 strResult = "" strDisplay = "" Sep1 = "\" Str1 = "FOX|OVER|THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick|jumps|the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX\OVER\THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\jumps\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "FOX/OVER/THE" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = "quick\JUMPS\the" Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG" strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf Str1 = LCase$("quick\jumps\THE") Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG") strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cOrTokenIn(Str2, Str1, Sep1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestReverse() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cReverse(Str1) strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cReverse(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestMixChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf Str1 = "TIME TO WIN (32-Bit)" Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf Str1 = "Under the sky, the sun lights" Str2 = cMixChars(Str1) strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cMixChars(Str2) txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cMixChars(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestScrollX() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = Text1.Text strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf For i = 1 To 7 Str2 = cScrollL(Str2) strDisplay = strDisplay & Str2 & vbCrLf Next i strDisplay = strDisplay & vbCrLf Str1 = Text1.Text Str2 = Text1.Text strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf For i = 1 To 7 Str2 = cScrollR(Str2) strDisplay = strDisplay & Str2 & vbCrLf Next i strDisplay = strDisplay & vbCrLf txt_Result = strDisplay 'time the function TimerStartOk = Timer For i = 1 To Iteration strResult = cScrollL(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestChangeChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "AZM", "qyc") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "AZM", "qyc") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf Call cChangeChars(Str1, "qyc", "+-*") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration Call cChangeChars(Str1, "AZM", "qyc") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestChangeCharsUntil() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf Call cChangeCharsUntil(Str1, "qyc", "+-*", "N") strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration Call cChangeCharsUntil(Str1, "AZM", "qyc", "N") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestCheckChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration intResult = cCheckChars(Str1, "aZ") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestFilterChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterChars(Str1, "BY") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cFilterChars(Str1, "B/") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestFilterNotChars() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & cFilterNotChars(Str1, "BY") txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cFilterNotChars(Str1, "B/") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestFilterBlocks() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cFilterBlocks(Str1, "BI") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestResizeString() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cResizeString(Str1, 5) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestResizeStringAndFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cResizeStringAndFill(Str1, 50, "*") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestCreateAndFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cCreateAndFill(40, Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestFill() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf Call cFill(Str1, "*=") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf Call cFill(Str1, "=*=") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf Call cFill(Str1, "7516") strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf Call cFill(Str1, "$61.00") strDisplay = strDisplay & "'" & Str1 & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration Call cFill(Str1, "*=") Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestLrc() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf Str1 = Chr$(2) & "0a12721536" strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cLrc(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestCompress() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf Str1 = "A " & Chr$(9) & "BC " strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cCompress(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Public Sub TestCompressTab() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String Dim Str3 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "A BC DEF GHIJ " For i = 1 To 6 Str2 = cCompressTab(Str1, i) Str3 = Str2 Call cChangeChars(Str3, vbTab, " strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf Next i txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cCompressTab(Str1, 3) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestCompact() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "987654321" Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf Str1 = "1234567890" Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf Str1 = Text1.Text Str2 = cCompact(Str1) strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cCompact(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestAlign() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "T2WIN-32" strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cAlign(Str1, 1, 30) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestProperName() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "John fitz,jr" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "john Fitz, jr" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "macdonald" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf Str1 = "mac donald" strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cProperName(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestProperName2() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "JOHN FITZ,JR" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "john Fitz,jr" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "macdonald" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "mac donald" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf Str1 = "a.l. greene jr." strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "shale and sandstone and till" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "a sandstone or a shale" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf Str1 = "RR2 BARRHEAD" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf Str1 = "ANDY MACDONALD" strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cProperName2(Str1, "", 0) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestStringSAR() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL" Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False) strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "2W", "IME TO W", True) strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "T2WIN-32", "", True) strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf Str2 = cStringSAR(Str1, "I", "i", False) strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf strDisplay = strDisplay & " in" & vbCrLf strDisplay = strDisplay & Str1 & vbCrLf strDisplay = strDisplay & " is" & vbCrLf strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestToHexa() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGH" Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf Str1 = "01234567890" Str2 = cToHexa(Str1) strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cToHexa(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestRomanArabic() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Value As Integer intResult = 0 strResult = "" strDisplay = "" Str1 = UCase$(cArabicToRoman(Year(Int(Now)))) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1)) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1)) strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf Value = Year(Int(Now)) strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf Value = Year(Int(Now)) - 1 strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf Value = Year(Int(Now)) + 1 strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cArabicToRoman(1996) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestAsciiEbcdic() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf Str1 = "ABCDEFGH" Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf Str1 = "01234567890" Str2 = Str1 Call cCnvASCIItoEBCDIC(Str2) strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf Call cCnvEBCDICtoASCII(Str2) strDisplay = strDisplay & "'" & Str2 & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration Call cCnvASCIItoEBCDIC(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestPatternMatch() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Under the blue sky, the sun lights" strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str2 = "Under?the * s??,*" TimerStartOk = Timer For i = 1 To Iteration intResult = cPatternMatch(Str1, Str2) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestPatternExtMatch() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String Dim Str2 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "Under the blue sky, the sun lights" strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf Str2 = "*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*??*???*?" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*Under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*sky*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "*lights" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "??der*sky*ligh??*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the * s??,*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "~55~6E*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the *'~72~73~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf Str2 = "*under*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under*sun" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under t??e*" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "~55~6G*~73" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf Str2 = "Under?the *'~72~53~74~75'" strDisplay = strDisplay & "'" & Str2 & "' is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str2 = "Under?the * s??,*" TimerStartOk = Timer For i = 1 To Iteration intResult = cPatternExtMatch(Str1, Str2) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestCheckNumericity() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "1234567890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "-1234567890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf Str1 = "+12345.67890" strDisplay = strDisplay & "'" & Str1 & "' is " strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration intResult = cCheckNumericity(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestAlphaDigit() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = "1234567890" strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf Str1 = Text1.Text strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration intResult = cAddDigit(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestH2X() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf Str1 = "0" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "1" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1B" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "7FFF" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf Str1 = "FFFF" strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf Str1 = "0" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "1" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1B" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "7FFFFFFF" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "B2A1A1B2" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf Str1 = "FFFFFFFF" strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration intResult = cH2I(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub Private Sub TestMorse() Dim intResult As Integer Dim strResult As String Dim strDisplay As String Dim i As Integer Dim Str1 As String intResult = 0 strResult = "" strDisplay = "" Str1 = Text1.Text strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "SOS" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "T2WIN-32" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf Str1 = "Nothing can beat the fox" strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf txt_Result = strDisplay 'time the function Str1 = Text1.Text TimerStartOk = Timer For i = 1 To Iteration strResult = cMorse(Str1) Next i mdiMCSTR.pnl_Timer = Int((Timer - TimerStartOk) * 1000) End Sub